/*
 * @Author: your name
 * @Date: 2020-01-14 22:59:20
 * @LastEditTime: 2020-01-14 23:00:22
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /hdreoprt/src/config/axiosConf/index.js
 */

//axios基本配置
export const AXIOS_DEFAULT_CONF = {
    baseURL:process.env.NODE_ENV == '"development"'?"/":"/",
    timeout: 50000,
    headers: {}
}

//请求拦截配置
export const AXIOS_REQUEST = {
    SUCCESS:config=>{
        return config
    },
    ERROR:error=>{
        Promise.reject(error)
    }
}

//响应拦截配置
export const AXIOS_RESPONSE = {
    SUCCESS:response=>{
        //结合自己业务修改
        return response.data
    },
    ERROR:error=>{
        // eslint-disable-next-line no-console
        console.log(`err:${error}`)
        
        return Promise.reject(error)
    }
}
